When data are encoded in a variable length code and transferred over a fixed rate channel, buffering must be provided to smooth the variable bit rate into the constant rate of the channel. If no means are provided for adjusting the average length per sample of the variable code, the buffer will overflow or underflow given sufficient time. In the case of high fidelity audio and practical buffer lengths, the average time to underflow or overflow is on the order of a few tens of milliseconds. With the present invention, buffer underflow or overflow is substantially eliminated and will occur only rarely.
Data compression systems which include means for converting analog signals to digital form, a digital compression filter to filter the digital signals, a variable word length encoder for encoding the compression filtered signals and buffer memory means for momentarily storing the encoded signals in preparation for transmission over a communication channel are well known as shown, for example, in PCT International Publication Number WO 85/02529, and U.S. Pat. Nos. 4,413,289; 4,449,536 and 4,546,342. U.S. Pat. No. 4,546,342 also shows use of entropy setting, or truncation, unit at the input to the digital compression filter for setting one or more of the least significant bits (LSB) of the compression filter input words to zero so as to control the average bit rate from the variable word length encoder. In the embodiment illustrated in FIG. 11 of U.S. Pat. No. 4,546,342, a mode control unit responsive to a measure of the variance of the encoded signals from the encoder is used in setting threshold levels at which different numbers of LSBs of the compression filter input words are truncated. However, with this prior art arrangement, if the average encoder output rate exceeds the transmission rate over the communication channel for a sufficient length of time, the buffer will overflow. Additionally, underflow of the buffer memory may occur if the transmission rate, which generally is constant, exceeds the average encoder output rate for a sufficient length of time.